import { request } from '@@/exports';
import { stringify } from 'qs';

export async function list(params: any): Promise<any> {
  return request(`/api/admin/redemption-codes?${stringify(params)}`);
}

export async function edit(id: number, params: any): Promise<any> {
  return request('/api/admin/redemption-codes/' + id, { method: 'put', data: params }); //get请求参数为params，post为data
}

export default {
  list,
  edit,
};
